package cn.east196.tfx.controller;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import cn.edu.scau.biubiusuisui.annotation.FXEntity;
import cn.edu.scau.biubiusuisui.annotation.FXField;

import java.lang.*;
import javafx.scene.control.*;
import javafx.scene.layout.*;
import javafx.geometry.Insets;
import javafx.scene.control.Button;
import javafx.scene.control.ComboBox;
import javafx.scene.control.Menu;
import javafx.scene.control.MenuBar;
import javafx.scene.control.MenuItem;
import javafx.scene.control.PasswordField;
import javafx.scene.control.TextField;
import javafx.scene.control.TreeView;
import javafx.scene.layout.HBox;
import javafx.scene.layout.VBox;
import javafx.scene.text.Font;

@FXEntity
public class Initializers {
	
	@FXField
	private MenuItem aboutMenu;
	@FXField
	private ComboBox dbTypeComboBox;
	@FXField
	private ComboBox urlComboBox;
	@FXField
	private TextField userNameField;
	@FXField
	private PasswordField passowrdField;
	@FXField
	private Button connButton;
	@FXField
	private TreeView dbTree;
	
	public MenuItem getAboutMenu() {
		return aboutMenu;
	}

	public void setAboutMenu(MenuItem aboutMenu) {
		this.aboutMenu = aboutMenu;
	}
	
	public ComboBox getDbTypeComboBox() {
		return dbTypeComboBox;
	}

	public void setDbTypeComboBox(ComboBox dbTypeComboBox) {
		this.dbTypeComboBox = dbTypeComboBox;
	}
	
	public ComboBox getUrlComboBox() {
		return urlComboBox;
	}

	public void setUrlComboBox(ComboBox urlComboBox) {
		this.urlComboBox = urlComboBox;
	}
	
	public TextField getUserNameField() {
		return userNameField;
	}

	public void setUserNameField(TextField userNameField) {
		this.userNameField = userNameField;
	}
	
	public PasswordField getPassowrdField() {
		return passowrdField;
	}

	public void setPassowrdField(PasswordField passowrdField) {
		this.passowrdField = passowrdField;
	}
	
	public Button getConnButton() {
		return connButton;
	}

	public void setConnButton(Button connButton) {
		this.connButton = connButton;
	}
	
	public TreeView getDbTree() {
		return dbTree;
	}

	public void setDbTree(TreeView dbTree) {
		this.dbTree = dbTree;
	}
	
	@Override 
	public int hashCode() {
		return HashCodeBuilder.reflectionHashCode(this);
	}

	@Override 
	public boolean equals(Object other) {
		return EqualsBuilder.reflectionEquals(this, other);
	}

	@Override 
	public String toString() {
		return ToStringBuilder.reflectionToString(this,ToStringStyle.DEFAULT_STYLE);
	}
	
}
